#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QSerialPort>
#include <QSerialPortInfo>
#include <QMessageBox>
#include <QMouseEvent>
#include <QComboBox>
#include <QRegExp>
#include <QFileDialog>
#include "opencv2/opencv.hpp"
using namespace cv;

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);

    void dataHandle(QStringList list);
    ~MainWindow();

protected:

private slots:
    void on_open_clicked();

    void serialPortFind();

    void on_close_clicked();

    void serialPort_readyRead();

    void addBorder();

private:
    Ui::MainWindow *ui;
    QSerialPort *serialPort;
    QString serialPortName;
    QTimer *Timer;
    QToolBar *BorderBar;
    QAction *BorderAction;
    QMenu *BorderMenu;
};
#endif // MAINWINDOW_H
